package com.charger.controller;

import com.charger.common.core.domain.AjaxResult;
import com.charger.domain.QChargerStation;
import com.charger.service.QChargerStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName QChargerController
 * @Description TODO
 * @Author QinKunPeng
 * @Date 2024年11月26日 19:30
 * @Version 1.0
 */
@RestController
@RequestMapping("/qcharger")
public class QChargerController {

    @Autowired
    private QChargerStationService stationService;

    @GetMapping("/list")
    public Object getChargers(){
        List<QChargerStation> list = stationService.list();
        return AjaxResult.success(list);
    }
}
